<template>
	<p>Current Component: A</p>
	<span>count: {{count}}</span>
	<button @click="count++">+</button>
</template>

<script setup>
	import { ref, onActivated, onDeactivated } from "vue" 
	
	const count = ref(0)
	
	onActivated(()=>{
		console.log('Component A进入激活状态。')
	})
	onDeactivated(()=>{
		console.log('Component A进入不活跃状态。')
	})
</script>

<style>
</style>